//
// Created by qiang on 2018/10/6.
//

#include "LinearList.h"
#include "stdio.h"
#include "stdlib.h"

//不要使用分号 就会变成 int;
#define ElemType int
#define MAXSIZE 20

typedef int Status;          /* Status是函数的类型,其值是函数结果状态代码，如OK等 */

#define OK 1
#define ERROR 0
#define TRUE 1
#define FALSE 0

#define MAXSIZE 20 /* 存储空间初始分配量 */

//线性表非链表
typedef struct {
    ElemType data[MAXSIZE];
    int length;
}SqList;

Status init(SqList *sqList) {
    sqList->length = 0;
    return OK;
}

Status isEmpty(SqList *sqList) {
    if(sqList->length==0){
        return TRUE;
    } else{
        return FALSE;
    }
}

Status getElem(SqList sqList,int length,ElemType *e){
    if(sqList.length==0||length<1||length>sqList.length+1){
        return FALSE;
    } else{
        int a = sqList.data[length - 1];
        *e =a;
    }

    return OK;
}

int length(SqList *sqList){
    return sqList->length;
}




int add(ElemType item){

}

void test(){


    int** p = 3;


    printf("");

}
